@include('Home.head')
<style>
    .wrapper {
        width: 100%;
        background-color: #fb4818;
        margin: 0 auto;
        height: 90px;
        border-radius: 10px;
        color: #ffffff;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 20px;
    }
    .wrapper h3 {
        font-size: 14px;
    }
    .wrapper h4 {
        padding:6px 0;
        font-size: 18px;
    }
    .con-wra {
        position: relative;
    }
    .con-wra img {
        width: 20px;
        height: auto;
    }
    .go-detail {
        position: absolute;
        right: 20px;
        top: 20px;
    }
</style>
<body>
<div class="container" id="app">
    @include('Home.member.header')
    <div class="my-nav-bar">
        <ol class="am-breadcrumb">
            <li><a href="#">首页</a></li>
            <li><a href="#">股东分红</a></li>
        </ol>
    </div>
    <div class="am-cf cart-panel con-wra" v-for="item in total">
        <div class="wrapper">
            <div>
            <h3>睡眠新世界股东分红</h3>
            <h4>@{{ item.money.substr(0,item.money.indexOf(".")+3) }}元</h4>
            </div>
        </div>
        <a :href="'/home/shareholder/shareholderList?type='+item.type" class="go-detail"><img src="http://qiniu.baoliy168.com/9fcca124bbc22f3e92551522df18398b.png" alt=""></a>
    </div>
    @include('Home.foot')
</div>
</body>
<script>
    var app = new Vue({
        el: "#app",
        data: {
            title: '我的资料',
            total:''
        },
        methods: {
            //初始化 系统管理员列表
            initialize: function () {
                $.post("/home/member/editInfo", {'_token': '{{csrf_token()}}', 'class': 'find'}, function (res) {
                    if (res.code) {
                        $.post("/home/shareholder/getShareholder", {
                            '_token': '{{csrf_token()}}',
                            uid: res.data.uid,
                            'class':'bonusTotal',
                            type:'DT_shareholder'
                        }, function (res) {
                            if (res.code) {
                                app.total = res.data
                                // var num = res.data.toString()
                                // app.total = num.substr(0,num.indexOf(".")+3)
                            } else {
                                layer.msg(res.data);
                            }
                        });
                    } else {
                        layer.msg(res.data);
                    }
                });
                {{--$.post("/home/timeShop/getTotal", {'_token': '{{csrf_token()}}', class: 'count'}, function (res) {--}}
                {{--    if (res.code) {--}}
                {{--        app.count = res.data--}}
                {{--    } else {--}}
                {{--        layer.msg(res.data);--}}
                {{--    }--}}
                {{--});--}}
            },
        },
        //自动执行
        mounted: function () {
            this.initialize();
        },
    })
</script>
</html>
